import { articles } from '@/api/index.js'
const state = {
  infoList: []
}
const mutations = {
  setInfoList (state, value) {
    state.infoList = value
  }
}
const actions = {
  async getInfoList (store, id) {
    console.log('getInfoList')
    const res = await articles(id)
    store.commit('setInfoList', res.data.data.results)
    console.log(res)
  }
}
const getters = {}
export default {
  namespaced: true,
  state,
  mutations,
  actions,
  getters
}
